package common_enum

// 公共-布尔值
type commonBool int

var CommonBool commonBool

// 否
func (c *commonBool) False() int {
	return -1
}

// 是
func (c *commonBool) True() int {
	return 1
}

func (c *commonBool) ToText(value int) string {
	switch value {

	case -1:
		return "否"

	case 1:
		return "是"

	}
	return ""
}

func (c *commonBool) ToValue(text string) int {
	switch text {

	case "否":
		return -1

	case "是":
		return 1

	}
	return 0
}
